class File

  alias_method :original_to_s, :to_s

  def to_s
    data=''
    self.each_line do |line|
      data += line
    end
    return data
  end

end


class Hash

  def method_missing(m, *a)
    if m.to_s =~ /=$/
      self[$`.to_sym] = a[0] # we allow only symbols as keys for input
    elsif a.empty?
      if (self.key?(m))# some hases are based on symbols
        return self[m]
      end
      return self[m.to_s]
    else
      raise NoMethodError, "#{m}"
    end
  end
end

class Array
  def second
    self[1]
  end

  def third
    self[2]
  end
end

  

def include_all(packages,from)
  packages.each { |pa| include_package(from+"."+pa) }
end

